home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97b.txt
/
000003_icon-group-sender _Fri Jun 27 06:01:27 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Received: from kingfisher.CS.Arizona.EDU by cheltenham.cs.arizona.edu; Fri, 27 Jun 1997 08:25:58 MST
Received: by kingfisher.CS.Arizona.EDU; (5.65v3.2/1.1.8.2/08Nov94-0446PM)
id AA18317; Fri, 27 Jun 1997 08:25:57 -0700
Posted-Date: Fri, 27 Jun 1997 06:01:27 -0500 (CDT)
Date: Fri, 27 Jun 1997 06:01:27 -0500 (CDT)
From: Chris Tenaglia <cdt@post.its.mcw.edu>
To: Lane Wimberley <lane@mcc.com>
Cc: icon-group@cs.arizona.edu
Subject: Re: Process ID availability?
In-Reply-To: <33B16186.1EA6@mcc.com>
Message-Id: <Pine.SOL.3.96.970627055343.26938A-100000@post.its.mcw.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
The following code seg will return the pid.
It assumes that you are running solaris unix
and that you aren't running other icon programs
in the same session. But it's probably adequate
for most applications.
procedure getpid()
pipe := open("ps -f","pr")
every line := !pipe do
if find("iconx",line) then
pid := parse(line,' ')[2]
close(pipe)
return pid
end
procedure parse(line,delims)
static chars
chars := &cset -- delims
tokens := []
line ? while tab(upto(chars)) do put(tokens,tab(many(chars)))
return tokens
end
Chris Tenaglia (system manager) | The future foretold,
Medical College of Wisconsin | The past explained,
8701 W. Watertown Plank Rd. | The present largely appologized for.
Milwaukee, WI 53226 (414)456-8765 | Organon to the Doctor
On Wed, 25 Jun 1997, Lane Wimberley wrote:
> Date: Wed, 25 Jun 1997 18:20:55 GMT
> From: Lane Wimberley <lane@mcc.com>
> To: icon-group@cs.arizona.edu
> Subject: Process ID availability?
>
> Is there a way to determine process ID in Icon? (... a la
> getpid() in C)
>
> --
> Lane Wimberley
> Microelectronics and Computer Technology Corporation
> Austin, TX
>